get minimum element in O(1) operation in stack